<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="format-detection" content="telephone=no">
    <title>特卖列表</title>
    <link rel="stylesheet" href="__TMPL__Public/assets/css/Reset.css">
    <link rel="stylesheet" href="__TMPL__Public/assets/css/style.css">
    <link rel="stylesheet" href="__TMPL__Public/assets/css/common.css">
    <script src="__TMPL__Public/assets/js/jquery-v1.10.2.min.js"></script>
    <style>
        body{
            background: #e4e8f5;
        }INSERT INTO think_city VALUES (4, '唐山市', '063000', 3),
    </style>
</head>
<body>
    <!-- 头部 -->
    <div class="header">
        <div class="left-cart list-cls">
            <span></span>
        </div>优品特卖
        <a href="{:U('shop/cart')}" class="right-cart">
            <span>
                <if condition="$shop_num eq ''">
                    <em class="car-num" style="display: none;"></em>
                <else/>
                    <em class="car-num">{$shop_num}</em>
                </if>
            </span>
        </a>
    </div>

    <div class="shops" style="margin-top:1.05rem;">
        <div class="paixu">
            <ul>
                <form id="frm1" action="" method="get">
                    <input id="sort1" type="hidden" name="sort" value="shop_sales">
                    <input id="sort_type1" type="hidden" name="sort_type" value="{$sort_type}">
                    <li class="px1 {$cls1}" name="1">销量</li>
                </form>
                <form id="frm2" action="" method="get">
                    <input id="sort" type="hidden" name="sort" value="shop_price">
                    <input id="sort_type" type="hidden" name="sort_type" value="{$sort_type}">
                    <li class="px2 {$cls2}">价格</li>
                </form>
            </ul>
        </div>
        <style>
            .shop_img{
                height:24em;
            }
        </style>

        <link rel="stylesheet" type="text/css" href="__TMPL__Public/assets/css/common.css">

        <style>
            /*列表*/
            .search-list>li{float: left; width: 3.45rem; margin:0.2rem 0 0 .2rem; min-height: 5.3rem; background: #fff;}
            .search-list>li>a{display: block;}
            .search-pic{width: 3.15rem; height: 4.45rem;  margin: 0.15rem;}
            .search-pic img{width: 100%; height: 100%;}
            h2.serch-tit{font-weight: normal; font-size: .3rem;  height: .35rem; line-height: .35rem; padding:0 0.15rem; white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
            .serch-price{position: relative; padding: .15rem;}
            .serch-price span{display: inline-block; font-size: .3rem; color: #8bc2e9; }
            .serch-price em{display:inline-block; width: 0.34rem; height: 0.3rem;  background: url(__TMPL__Public/assets/img/icon-like.png) 0 0 no-repeat; background-size: cover; position: absolute; right: .2rem; top: .2rem;}
            .serch-price em.active{background: url(__TMPL__Public/assets/img/icon-like-on.png) 0 0 no-repeat; background-size: cover;}
            .goods-cls{background: url(__TMPL__Public/assets/img/icon011.png) 0 0 no-repeat; background-size: cover;width:.55rem;height:.55rem;}
        </style>

        <!-- 服装列表 -->
        <div class="search-box">
            <ul class="search-list clearfix">
                <foreach name="shops" item="vo">
                    <li>
                        <a class="search-list-item" href="{:U('shop/detail',array('shop_id'=>$vo['id']))}">
                            <div class="search-pic">
                                <img src="__UPLOAD__{$vo['smeta']['thumb']}">
                            </div>
                            <h2 class="serch-tit">{$vo.shop_title}</h2>
                            <div class="serch-price"><span>￥{$vo.shop_price}/{$vo.shop_pany}</span></div>
                        </a>
                    </li>
                </foreach>
            </ul>
        </div>
        <!-- 底部导航 -->
        <div class="bott-footer"></div>
        <tc_include file="Public:footer"/>
    </div>
    <div class="category" style="display: none;">
        <a href="{:U('')}"><div class="find">全部商品</div></a>
        <!-- 一级分类 -->
        <foreach name="cats" item="v">
            <div class="" >
                <div class="all">{$v.cat_name}</div>
                <!-- 二级分类 -->
                <div class="">
                    <foreach name="v.f" item="vv">
                        <a href="{:U('shop/index',array('cat'=>$vv['cid']))}"><div class="find">{$vv.cat_name}</div></a>
                    </foreach>
                </div>
            </div>
        </foreach>
    </div>
    <script>
        $(function () {
           $('.list-cls').click(function () {
               if($('.category').css('display') == 'block'){
                   $('.shops').show();
                   $('.category').hide();
               }else{
                   $('.category').show();
                   $('.shops').hide();
               }
           });

           $('.px1').click(function () {
               $('#frm1').submit();
           });
           $('.px2').click(function () {
               $('#frm2').submit();
           });
        });
    </script>
</body>
</html>